<?php

if ($this->session->userdata('id') > 0) { ?>

	<div  style="border:1px solid #ccc; float:left; margin-bottom:3px; padding-left:35px;">
        <h4>Your all products</h4>
        <?php 
		if($this->uri->segment(3)=='dsucc')
			echo '<h4 style="color:blue;">Deleted product successfull !!!</h4>';
		if($this->uri->segment(3)=='addsucc')
			echo '<h4 style="color:blue;">Added product successfull !!!</h4>';
		if($this->uri->segment(3)=='upsucc')
			echo '<h4 style="color:blue;">Updated product successfull !!!</h4>';
		?>
           <div style="float:left;">
                 <hr class="news_hr" />   
                    <?php 
                    if($pro_list->num_rows()>0){
                        foreach($pro_list->result() as $rows){
                    ?>
                    
                    <div style="float:left; margin:7px;">
                   
                    	<a href='<?php echo site_url().'assets/uploads/original/' . $rows->pro_img; ?>'>
							<?php
                            $image_properties = array(
                                'src' => 'assets/uploads/thumbs/thumb_' . $rows->pro_img,
                                'alt' => $rows->pro_name,
                                'class' => 'post_images',
                                'width' => '80',
                                'height' => '70',
                                'title' => $rows->pro_description,
                                'rel' => 'lightbox',
                            );
                            echo img($image_properties);
                            ?>
                        </a>
                    <br />
    
                    <a onclick="return confirm('Are you sure to delete ?');" class="prod_buy" href="<?php echo site_url('pages/delete').'/'.$rows->pro_img; ?>">Delete</a>
                    |<a onclick="return confirm('Are you sure to update ?');" href="<?php echo site_url('pages/user_sel_up_product').'/'.$rows->pro_id; ?>">Update</a>
                    <br /><br /><br />
    
                    </div>
                    <?php
                        }
                    }
					
					
					
                    ?> 
                    
                    
                    
       </div>
       <h4>View pages :<?php echo $pages; ?></h4>
    </div>
<?php }else{ redirect(site_url()); } ?>